package com.xuecheng.api.client;

import com.xuecheng.api.client.fallback.CheckcodeClientFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 勾新杰
 * @version 1.0
 * @description: 验证码服务客户端
 * @date 2025/2/22 16:23
 */
@FeignClient(value = "checkcode-api",fallbackFactory = CheckcodeClientFallBackFactory.class, path = "/checkcode")
public interface CheckcodeClient {

    /**
     * 校验验证码
     *
     * @param key  验证key
     * @param code 验证码
     * @return 校验结果
     */
    @PostMapping(value = "/verify")
    Boolean verify(@RequestParam("key") String key, @RequestParam("code") String code);
}
